package com.team.po;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class ScrapExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ScrapExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andSidIsNull() {
            addCriterion("Sid is null");
            return (Criteria) this;
        }

        public Criteria andSidIsNotNull() {
            addCriterion("Sid is not null");
            return (Criteria) this;
        }

        public Criteria andSidEqualTo(Integer value) {
            addCriterion("Sid =", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotEqualTo(Integer value) {
            addCriterion("Sid <>", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThan(Integer value) {
            addCriterion("Sid >", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThanOrEqualTo(Integer value) {
            addCriterion("Sid >=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThan(Integer value) {
            addCriterion("Sid <", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThanOrEqualTo(Integer value) {
            addCriterion("Sid <=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidIn(List<Integer> values) {
            addCriterion("Sid in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotIn(List<Integer> values) {
            addCriterion("Sid not in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidBetween(Integer value1, Integer value2) {
            addCriterion("Sid between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotBetween(Integer value1, Integer value2) {
            addCriterion("Sid not between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andEqucategoryIsNull() {
            addCriterion("equCategory is null");
            return (Criteria) this;
        }

        public Criteria andEqucategoryIsNotNull() {
            addCriterion("equCategory is not null");
            return (Criteria) this;
        }

        public Criteria andEqucategoryEqualTo(String value) {
            addCriterion("equCategory =", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryNotEqualTo(String value) {
            addCriterion("equCategory <>", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryGreaterThan(String value) {
            addCriterion("equCategory >", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryGreaterThanOrEqualTo(String value) {
            addCriterion("equCategory >=", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryLessThan(String value) {
            addCriterion("equCategory <", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryLessThanOrEqualTo(String value) {
            addCriterion("equCategory <=", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryLike(String value) {
            addCriterion("equCategory like", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryNotLike(String value) {
            addCriterion("equCategory not like", value, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryIn(List<String> values) {
            addCriterion("equCategory in", values, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryNotIn(List<String> values) {
            addCriterion("equCategory not in", values, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryBetween(String value1, String value2) {
            addCriterion("equCategory between", value1, value2, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqucategoryNotBetween(String value1, String value2) {
            addCriterion("equCategory not between", value1, value2, "equcategory");
            return (Criteria) this;
        }

        public Criteria andEqunameIsNull() {
            addCriterion("equName is null");
            return (Criteria) this;
        }

        public Criteria andEqunameIsNotNull() {
            addCriterion("equName is not null");
            return (Criteria) this;
        }

        public Criteria andEqunameEqualTo(String value) {
            addCriterion("equName =", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameNotEqualTo(String value) {
            addCriterion("equName <>", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameGreaterThan(String value) {
            addCriterion("equName >", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameGreaterThanOrEqualTo(String value) {
            addCriterion("equName >=", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameLessThan(String value) {
            addCriterion("equName <", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameLessThanOrEqualTo(String value) {
            addCriterion("equName <=", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameLike(String value) {
            addCriterion("equName like", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameNotLike(String value) {
            addCriterion("equName not like", value, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameIn(List<String> values) {
            addCriterion("equName in", values, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameNotIn(List<String> values) {
            addCriterion("equName not in", values, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameBetween(String value1, String value2) {
            addCriterion("equName between", value1, value2, "equname");
            return (Criteria) this;
        }

        public Criteria andEqunameNotBetween(String value1, String value2) {
            addCriterion("equName not between", value1, value2, "equname");
            return (Criteria) this;
        }

        public Criteria andScrapdateIsNull() {
            addCriterion("scrapDate is null");
            return (Criteria) this;
        }

        public Criteria andScrapdateIsNotNull() {
            addCriterion("scrapDate is not null");
            return (Criteria) this;
        }

        public Criteria andScrapdateEqualTo(Date value) {
            addCriterionForJDBCDate("scrapDate =", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("scrapDate <>", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateGreaterThan(Date value) {
            addCriterionForJDBCDate("scrapDate >", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("scrapDate >=", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateLessThan(Date value) {
            addCriterionForJDBCDate("scrapDate <", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("scrapDate <=", value, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateIn(List<Date> values) {
            addCriterionForJDBCDate("scrapDate in", values, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("scrapDate not in", values, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("scrapDate between", value1, value2, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("scrapDate not between", value1, value2, "scrapdate");
            return (Criteria) this;
        }

        public Criteria andScrapnumberIsNull() {
            addCriterion("scrapNumber is null");
            return (Criteria) this;
        }

        public Criteria andScrapnumberIsNotNull() {
            addCriterion("scrapNumber is not null");
            return (Criteria) this;
        }

        public Criteria andScrapnumberEqualTo(Integer value) {
            addCriterion("scrapNumber =", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberNotEqualTo(Integer value) {
            addCriterion("scrapNumber <>", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberGreaterThan(Integer value) {
            addCriterion("scrapNumber >", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberGreaterThanOrEqualTo(Integer value) {
            addCriterion("scrapNumber >=", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberLessThan(Integer value) {
            addCriterion("scrapNumber <", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberLessThanOrEqualTo(Integer value) {
            addCriterion("scrapNumber <=", value, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberIn(List<Integer> values) {
            addCriterion("scrapNumber in", values, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberNotIn(List<Integer> values) {
            addCriterion("scrapNumber not in", values, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberBetween(Integer value1, Integer value2) {
            addCriterion("scrapNumber between", value1, value2, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrapnumberNotBetween(Integer value1, Integer value2) {
            addCriterion("scrapNumber not between", value1, value2, "scrapnumber");
            return (Criteria) this;
        }

        public Criteria andScrappeopleIsNull() {
            addCriterion("scrapPeople is null");
            return (Criteria) this;
        }

        public Criteria andScrappeopleIsNotNull() {
            addCriterion("scrapPeople is not null");
            return (Criteria) this;
        }

        public Criteria andScrappeopleEqualTo(String value) {
            addCriterion("scrapPeople =", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleNotEqualTo(String value) {
            addCriterion("scrapPeople <>", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleGreaterThan(String value) {
            addCriterion("scrapPeople >", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleGreaterThanOrEqualTo(String value) {
            addCriterion("scrapPeople >=", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleLessThan(String value) {
            addCriterion("scrapPeople <", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleLessThanOrEqualTo(String value) {
            addCriterion("scrapPeople <=", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleLike(String value) {
            addCriterion("scrapPeople like", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleNotLike(String value) {
            addCriterion("scrapPeople not like", value, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleIn(List<String> values) {
            addCriterion("scrapPeople in", values, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleNotIn(List<String> values) {
            addCriterion("scrapPeople not in", values, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleBetween(String value1, String value2) {
            addCriterion("scrapPeople between", value1, value2, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andScrappeopleNotBetween(String value1, String value2) {
            addCriterion("scrapPeople not between", value1, value2, "scrappeople");
            return (Criteria) this;
        }

        public Criteria andRidIsNull() {
            addCriterion("Rid is null");
            return (Criteria) this;
        }

        public Criteria andRidIsNotNull() {
            addCriterion("Rid is not null");
            return (Criteria) this;
        }

        public Criteria andRidEqualTo(Integer value) {
            addCriterion("Rid =", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotEqualTo(Integer value) {
            addCriterion("Rid <>", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThan(Integer value) {
            addCriterion("Rid >", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThanOrEqualTo(Integer value) {
            addCriterion("Rid >=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThan(Integer value) {
            addCriterion("Rid <", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThanOrEqualTo(Integer value) {
            addCriterion("Rid <=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidIn(List<Integer> values) {
            addCriterion("Rid in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotIn(List<Integer> values) {
            addCriterion("Rid not in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidBetween(Integer value1, Integer value2) {
            addCriterion("Rid between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotBetween(Integer value1, Integer value2) {
            addCriterion("Rid not between", value1, value2, "rid");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}